﻿@{
    Layout = null;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="~/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="~/css/style.css" />
    <link href="~/assets/css/codemirror.css" rel="stylesheet" />
    <link rel="stylesheet" href="~/assets/css/ace.min.css" />
    <link href="~/layui-v2.5.4/layui/css/layui.css" rel="stylesheet" />
    <link rel="stylesheet" href="~/font/css/font-awesome.min.css" />
    <!--[if lte IE 8]>
      <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
    <![endif]-->
    <script src="~/Scripts/jquery-1.9.1.min.js"></script>
    <script src="~/assets/js/bootstrap.min.js"></script>
    <script src="~/assets/js/typeahead-bs2.min.js"></script>
    <script src="~/assets/js/jquery.dataTables.min.js"></script>
    <script src="~/assets/js/jquery.dataTables.bootstrap.js"></script>
    <script src="~/assets/layer/layer.js" type="text/javascript"></script>
    <script src="~/layui-v2.5.4/layui/layui.js" type="text/javascript"></script>
    <script src="~/assets/laydate/laydate.js" type="text/javascript"></script>
    <script src="~/static/scenicspot/scenicspotIndex.js" type="text/javascript"></script>@*引入页面Jquery代码*@
    <title>商品图片管理</title>
</head>

<body>
    <div class="margin clearfix">
        <div class="" id="Other_Management">
            <div class="search_style">

                <ul class="search_content clearfix">
                    <li><label class="l_f">景点名称</label><input name="" id="scernicName" type="text" class="text_add" placeholder="景点名称" style=" width:400px" /></li>
                    <li style="width:90px;"><button id="SelscernicName" type="button" class="btn_search"><i class="fa fa-search"></i>查询</button></li>
                </ul>
            </div>
            <div class="border clearfix">
                <span class="l_f">
                    <button id="AddScenicspot" class="btn btn-danger">&nbsp;添加&nbsp;</button>
                </span>
                <span class="l_f">
                    <a id="DelListByID" class="btn btn-danger"><i class="fa fa-trash"></i>&nbsp;批量删除</a>
                </span>
                <span class="r_f">共：<b>2345</b>条</span>
            </div>
            <div class="right" id="Rigth" style="display:none">
                <fieldset class="layui-elem-field layui-field-title">
                    <legend id="rigthName">添加路线</legend>
                </fieldset>
                <div id="divContext">
                    <div id="layui-form">
                        <input type="hidden" value="" name="Id" id="Id" />
                        <div class="layui-form-item" style="width:50%">
                            <label class="layui-form-label">景点名称</label>
                            <div class="layui-input-block">
                                <input type="text" name="ScenicName" id="ScenicName" required=required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">景点等级</label>
                            <div class="layui-input-block">
                                <span class="select-box">
                                    <!--admin-role-->
                                    <select style="height:40px;width:39%;margin-left:2%" class="select" id="Certification" name="Certification" size="1">
                                        <option value="暂无">请选择</option>
                                        <option value="1A级">1A级</option>
                                        <option value="2A级">2A级</option>
                                        <option value="3A级">3A级</option>
                                        <option value="4A级">4A级</option>
                                        <option value="5A级">5A级</option>
                                    </select>
                                </span>
                            </div>
                        </div>
                        <div class="layui-form-item" style="width:50%">
                            <label class="layui-form-label">注意事项</label>
                            <div class="layui-input-block">
                                <input type="text" name="BeCarefulInfoId" id="BeCarefulInfoId" required=required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="form-label">景点描述：</label>
                            <div class="formControls" style="margin-left:6%">
                                <textarea name="Context" id="Context" cols="" rows="" class="textarea" placeholder="景点介绍...200个字符以内" dragonfly="true" onkeyup="checkLength(this);"></textarea>
                                <span class="wordage">剩余字数：<span id="sy" style="color:Red;">200</span>字</span>
                            </div>
                            <div class="col-4"> </div>
                        </div>
                    </div>
                    <div class="layui-form-item" style="margin-top:20px">
                        <div class="layui-input-block">
                            <input type="button" id="commit" value="立即提交" class="layui-btn" lay-submit=lay-submit lay-filter="submit" />
                        </div>
                    </div>
                </div>
            </div>


            <div class="list_style">
                <table class="layui-hide" id="test" lay-filter="demo"></table>

                <script type="text/html" id="barDemo">
                    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
                </script>
            </div>

        </div>
    </div>
</body>
</html>
<script>
    jQuery(function ($) {
        var oTable1 = $('#sample-table').dataTable({
            "aaSorting": [[1, "desc"]],//默认第几个排序
            "bStateSave": true,//状态保存
            "aoColumnDefs": [
                //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                { "orderable": false, "aTargets": [0, 2, 3, 6] }// 制定列不参与排序
            ]
        });


        $('table th input:checkbox').on('click', function () {
            var that = this;
            $(this).closest('table').find('tr > td:first-child input:checkbox')
                .each(function () {
                    this.checked = that.checked;
                    $(this).closest('tr').toggleClass('selected');
                });

        });
    });



    /*用户-删除*/
    function member_del(obj, id) {
        layer.confirm('确认要删除吗？', function (index) {
            $(obj).parents("tr").remove();
            layer.msg('已删除!', { icon: 1, time: 1000 });
        });
    }
    //积分浏览
    function integration_history(id) {
        layer.open({
            type: 1,
            title: '积分获取记录',
            area: ['800px', '400px'],
            shadeClose: true,
            content: $('#integration_history'),
        })
        $('#integration_history_list').dataTable({
            "aaSorting": [[1, "desc"]],//默认第几个排序
            "bStateSave": true,//状态保存
            "aoColumnDefs": [{
                "bSortable": false,
                "orderable": false,
                "aTargets": [0, 1]
            }]
        });

    };
    //浏览记录

    function Browse_history(id) {
        layer.open({
            type: 1,
            title: '浏览记录',
            area: ['800px', '400px'],
            shadeClose: true,
            content: $('#Browse_history'),
        })
        $('#Browse_history_list').dataTable({
            "aaSorting": [[1, "desc"]],//默认第几个排序
            "bStateSave": true,//状态保存
            "aoColumnDefs": [{
                "bSortable": false,
                "orderable": false,
                "aTargets": [0, 1]
            }]
        });
    }


    //购物记录
    function Order_history(id) {
        layer.open({
            type: 1,
            title: '购物记录',
            area: ['800px', '400px'],
            shadeClose: true,
            content: $('#Order_history'),
        });
        $('#Order_history_list').dataTable({
            "aaSorting": [[1, "desc"]],//默认第几个排序
            "bStateSave": true,//状态保存
            "aoColumnDefs": [{
                "bSortable": false,
                "orderable": false,
                "aTargets": [0, 1]
            }]
        });
    }


</script>
<script>
    //字数限制
    function checkLength(which) {
        var maxChars = 200; //
        if (which.value.length > maxChars) {
            layer.open({
                icon: 2,
                title: '提示框',
                content: '您输入的字数超过限制!',
            });
            // 超过限制的字数了就将 文本框中的内容按规定的字数 截取
            which.value = which.value.substring(0, maxChars);
            return false;
        } else {
            var curr = maxChars - which.value.length; //250 减去 当前输入的
            document.getElementById("sy").innerHTML = curr.toString();
            return true;
        }
    };
</script>
